From: Keir Fraser Date: Thu, 11 Mar 2010 08:09:37 +0000 (+0000) Subject: Fix 21020:3198a2e81d38 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12518 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=7a6d294eb96ce934efbd8c3ab517d9ddd03c0089;p=xen.git Fix 21020:3198a2e81d38 This has a pretty serious bug. ioapic_to_iommu() gets returned drhd->iommu. However, drhd->iommu isn't allocated until part of iommu_setup(), which is called after enable_x2apic(). Has this ever worked? Signed-off-by: Alex Williamson --- diff --git a/xen/drivers/passthrough/vtd/intremap.c b/xen/drivers/passthrough/vtd/intremap.c index 0b3d95827b..fcab930b61 100644 --- a/xen/drivers/passthrough/vtd/intremap.c +++ b/xen/drivers/passthrough/vtd/intremap.c @@ -134,7 +134,7 @@ int iommu_supports_eim(void) /* We MUST have a DRHD unit for each IOAPIC. */ for ( apic = 0; apic < nr_ioapics; apic++ ) - if ( !ioapic_to_iommu(IO_APIC_ID(apic)) ) + if ( !ioapic_to_drhd(IO_APIC_ID(apic)) ) return 0; if ( list_empty(&acpi_drhd_units) )